<html>
<head><meta charset="utf-8"><title>translation · t-compiler/wg-diagnostics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/index.html">t-compiler/wg-diagnostics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html">translation</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="187042515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042515">(Jan 30 2020 at 23:24)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> <span class="user-mention" data-user-id="126931">@centril</span> there is definitely a plan for internationalization :)</p>



<a name="187042568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042568">(Jan 30 2020 at 23:25)</a>:</h4>
<p>is that plan concrete implementation wise though? My impression is that we have broad strokes (e.g., maybe even what platform to use) but not the details.</p>



<a name="187042639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042639">(Jan 30 2020 at 23:26)</a>:</h4>
<p>Once we have diagnostics structs as listed in the issue then it should be easy ish to add i18n based on various json files or something that key off of the text error code or something</p>



<a name="187042675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042675">(Jan 30 2020 at 23:26)</a>:</h4>
<p>This assumes there's a human-understandable "error code" like <code>object-safety-generics</code> that we can key off of but if we decide against codes then we can still use this internally</p>



<a name="187042687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042687">(Jan 30 2020 at 23:27)</a>:</h4>
<p>(split off into new topic)</p>



<a name="187042703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042703">(Jan 30 2020 at 23:27)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> there are some open questions but in this case I think it's _mostly_ clear implementation wise what we can do</p>



<a name="187042712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042712">(Jan 30 2020 at 23:27)</a>:</h4>
<p>We don't even necessarily need to pull in Fluent</p>



<a name="187042769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042769">(Jan 30 2020 at 23:28)</a>:</h4>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span> hm, okay</p>



<a name="187042775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042775">(Jan 30 2020 at 23:28)</a>:</h4>
<p>that's farther than I thought we were</p>



<a name="187042797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042797">(Jan 30 2020 at 23:29)</a>:</h4>
<p>Error i18n is blocked on y'all implementing the diagnostics derive</p>



<a name="187042829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042829">(Jan 30 2020 at 23:29)</a>:</h4>
<p>error index i18n isn't blocked on anything someone just needs to do it, also it would make sense to hold off until after we figure out error codes</p>



<a name="187042842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042842">(Jan 30 2020 at 23:30)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> note that this is only a plan, no implementation</p>



<a name="187042910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042910">(Jan 30 2020 at 23:30)</a>:</h4>
<p>But please loop me in on PRs implementing the diagnostics derive so I can ensure it's compatible with this</p>



<a name="187042924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042924">(Jan 30 2020 at 23:30)</a>:</h4>
<p>I was going to do it myself but I keep not having time lol</p>



<a name="187042984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187042984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187042984">(Jan 30 2020 at 23:31)</a>:</h4>
<p>yeah, this also all sounds mostly compatible</p>



<a name="187043067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043067">(Jan 30 2020 at 23:32)</a>:</h4>
<p>I continue to be skeptical about the "many files on disk", but of course the final artifacts can bundle things up if needed</p>



<a name="187043107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043107">(Jan 30 2020 at 23:33)</a>:</h4>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span> did you have thoughts re. translation of error descriptions though? (i.e. the <code>.md</code> files we have today)</p>



<a name="187043126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043126">(Jan 30 2020 at 23:33)</a>:</h4>
<p>these: <a href="https://github.com/rust-lang/rust/tree/master/src/librustc_error_codes/error_codes" target="_blank" title="https://github.com/rust-lang/rust/tree/master/src/librustc_error_codes/error_codes">https://github.com/rust-lang/rust/tree/master/src/librustc_error_codes/error_codes</a></p>



<a name="187043283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043283">(Jan 30 2020 at 23:35)</a>:</h4>
<p>As long as there's something to key off of this is quite easy.</p>



<a name="187043328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043328">(Jan 30 2020 at 23:36)</a>:</h4>
<p>Again, some open questions.</p>



<a name="187043354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043354">(Jan 30 2020 at 23:36)</a>:</h4>
<p>it's basically just a string code that is linked up via a rustc_driver hashmap to descriptions</p>



<a name="187043359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043359">(Jan 30 2020 at 23:36)</a>:</h4>
<p>it's very isolated</p>



<a name="187043394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043394">(Jan 30 2020 at 23:37)</a>:</h4>
<p>but I was wondering re. the linking aspect; e.g. how do we store the translations and how does rustc load them?</p>



<a name="187043478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043478">(Jan 30 2020 at 23:38)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/registry/struct.Registry.html" target="_blank" title="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/registry/struct.Registry.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/registry/struct.Registry.html</a></p>



<a name="187043600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043600">(Jan 30 2020 at 23:40)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> rustup component, basically json files or something. which specific format depends on what works with Pontoon and what can support the detail we need. I think for error codes the json format is fine.</p>



<a name="187043615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043615">(Jan 30 2020 at 23:41)</a>:</h4>
<p>Could also bake it in, but at least to start with a rustup component makes sense to me</p>



<a name="187043624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043624">(Jan 30 2020 at 23:41)</a>:</h4>
<p>For diagnostics we may need to use a format a bit more powerful than json</p>



<a name="187043627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043627">(Jan 30 2020 at 23:41)</a>:</h4>
<p>Maybe.</p>



<a name="187043635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043635">(Jan 30 2020 at 23:41)</a>:</h4>
<p>Either way these files are never hand generated</p>



<a name="187043644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043644">(Jan 30 2020 at 23:41)</a>:</h4>
<p>Er, handwritten</p>



<a name="187043687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043687">(Jan 30 2020 at 23:42)</a>:</h4>
<p>Or read by humans.</p>



<a name="187043702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043702">(Jan 30 2020 at 23:42)</a>:</h4>
<p>Error descriptions are basically just a long string, so it requires nothing technically complicated beyond that I think</p>



<a name="187043704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043704">(Jan 30 2020 at 23:42)</a>:</h4>
<p>I continue to think the linking aspect is not too interesting :)</p>



<a name="187043710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043710">(Jan 30 2020 at 23:42)</a>:</h4>
<p>like, we can definitely do it</p>



<a name="187043726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043726">(Jan 30 2020 at 23:42)</a>:</h4>
<p>I personally favor the existing solution as being just fine</p>



<a name="187043736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043736">(Jan 30 2020 at 23:42)</a>:</h4>
<p>I agree in the sense that it's not complicated</p>



<a name="187043759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043759">(Jan 30 2020 at 23:43)</a>:</h4>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span>  I suspect the error descriptions are the most readily translatable asset we have</p>



<a name="187043764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043764">(Jan 30 2020 at 23:43)</a>:</h4>
<p>since it's so simple</p>



<a name="187043783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043783">(Jan 30 2020 at 23:43)</a>:</h4>
<p>Yes those are the easiest</p>



<a name="187043786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043786">(Jan 30 2020 at 23:43)</a>:</h4>
<p>basically you need to swap out a string for another string</p>



<a name="187043790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043790">(Jan 30 2020 at 23:43)</a>:</h4>
<p>I actually started doing them at one point lol and then left it</p>



<a name="187043832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043832">(Jan 30 2020 at 23:44)</a>:</h4>
<p>It's not hard tbh</p>



<a name="187043848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043848">(Jan 30 2020 at 23:44)</a>:</h4>
<p>Like if you want me to jot down a full plan in an issue I can</p>



<a name="187043850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043850">(Jan 30 2020 at 23:44)</a>:</h4>
<p>yea; if we setup some infra I bet people will come and do it</p>



<a name="187043863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043863">(Jan 30 2020 at 23:44)</a>:</h4>
<p>there's a bunch of initial work that needs to be done</p>



<a name="187043885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043885">(Jan 30 2020 at 23:45)</a>:</h4>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span> in rustup?</p>



<a name="187043903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043903">(Jan 30 2020 at 23:45)</a>:</h4>
<p>Okay one question: presumably y'all still want to write these as MD files yes? So we should be generating the English json files via some step which Pontoon can then consume</p>



<a name="187043912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043912">(Jan 30 2020 at 23:45)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> also in rustc so it knows how to load these etc</p>



<a name="187043991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043991">(Jan 30 2020 at 23:46)</a>:</h4>
<p>For all of this there are two options: forcing rustc users to write things in the json/whatever format, or using what we use today and having an autogenrtation step</p>



<a name="187043992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043992">(Jan 30 2020 at 23:46)</a>:</h4>
<p>MD files is a pretty new (but nice!) thing -- they used to be hard-coded strings in the <code>errors.rs</code> files</p>



<a name="187043996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187043996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187043996">(Jan 30 2020 at 23:46)</a>:</h4>
<p>Both work, it's up to y'all</p>



<a name="187044003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044003">(Jan 30 2020 at 23:46)</a>:</h4>
<p>I know! I wrote half of them :)</p>



<a name="187044010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044010">(Jan 30 2020 at 23:46)</a>:</h4>
<p>:D</p>



<a name="187044025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044025">(Jan 30 2020 at 23:47)</a>:</h4>
<blockquote>
<p>also in rustc so it knows how to load these etc</p>
</blockquote>
<p><span class="user-mention" data-user-id="132040">@Manish Goregaokar</span>  could we start with a dumb <code>-Z</code> flag perhaps?</p>



<a name="187044046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044046">(Jan 30 2020 at 23:47)</a>:</h4>
<p>and no rustup support initially</p>



<a name="187044049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044049">(Jan 30 2020 at 23:47)</a>:</h4>
<p>Yes</p>



<a name="187044072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044072">(Jan 30 2020 at 23:47)</a>:</h4>
<p>If y'all want I can file a bunch of concrete issues</p>



<a name="187044114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044114">(Jan 30 2020 at 23:48)</a>:</h4>
<p>And a meta issue and a plan or whatever</p>



<a name="187044120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044120">(Jan 30 2020 at 23:48)</a>:</h4>
<p>sounds helpful <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<a name="187044127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044127">(Jan 30 2020 at 23:48)</a>:</h4>
<p>Don't have bandwidth to do this myself but I can watch and help</p>



<a name="187044135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044135">(Jan 30 2020 at 23:48)</a>:</h4>
<p>I was mostly waiting for diagnostics derive to happen first</p>



<a name="187044199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044199">(Jan 30 2020 at 23:49)</a>:</h4>
<p>For short diagnostics we may not be able to have a sensible generation step and diagnostics writers may need to write text for the diagnostic in a file fwiw</p>



<a name="187044275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044275">(Jan 30 2020 at 23:50)</a>:</h4>
<p>But maybe not</p>



<a name="187044295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044295">(Jan 30 2020 at 23:51)</a>:</h4>
<p>maybe we can hard-code the English strings in the struct to make the diagnostics dev UX less "jumpy"</p>



<a name="187044300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044300">(Jan 30 2020 at 23:51)</a>:</h4>
<p>also to facilitate the move</p>



<a name="187044396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044396">(Jan 30 2020 at 23:52)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> we can hardcode provided there's a way to extract it in a structured format, which is trickier for structs</p>



<a name="187044411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/translation/near/187044411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/translation.html#187044411">(Jan 30 2020 at 23:52)</a>:</h4>
<p>That said it's possible to just use a basic parse script for this. Annoying</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>